const http = require("http");
const fs = require("fs");
const url = require("url");
http.createServer((req, res) => {
    let pathname = url.parse(req.url).pathname;
    if (pathname == "/") {
        pathname = "test.html"
    }
    fs.readFile("./static/" + pathname, (err, data) => {
        res.end(data)
    })

}).listen(5000)